<?php

$db['track']=array (
    'columns' =>array (
        'id'=>array(
          'type' => 'number',
          'required' => true,
          'pkey' => true,
          'extra' => 'auto_increment',
          'label' => __('ID'),
          'width' => 110,
          'hidden' => true,
          'editable' => false,
        ),
        'express_id'=>array(
          'type' => 'varchar(50)',
          'required' => true,
          'unique' => true,
          'label' => __('快件单号'),
          'width' => 110,
          'searchtype' => 'has',
          'editable' => false,
          'filtertype'=>'custom',
          'filtercustom'=>array('head'=>'开头等于'),
          'filterdefalut'=>true,
        ),
        'op_time'=>array (
          'type' => 'time',
          'required' => true,
          'label' => __('操作时间'),
          'width' => 75,
          'editable' => false,
          'filtertype'=>'time',
          'filterdefalut'=>true,
        ),
        'op_msg' =>array (
          'type' => 'varchar(255)',
          'required' => true,
          'label' => __('操作信息'),
          'width' => 75,
          'editable' => false,
        ),
        'op_user' =>array (
          'type' => 'object:admin/operator',
          'required' => true,
          'label' => __('操作人'),
          'width' => 75,
          'searchtype' => 'yes',
          'editable' => false,
          'filtertype'=>'yes',
          'filterdefalut'=>true,
        ),
        'status' =>array (
          'type' =>
            array (
            'succ' => __('成功到达'),
            'failed' => __('发货失败'),
            'cancel' => __('已取消'),
            'lost' => __('货物丢失'),
            'progress' => __('运送中'),
            'timeout' => __('超时'),
            //'ready' => __('准备发货'),
          ),
          'default' => 'progress',
          'required' => true,
          'label' => __('当前状态'),
          'width' => 75,
          'editable' => false,
          'filtertype'=>'yes',
          'filterdefalut'=>true,
        ),
        'createtime' =>array (
          'type' => 'time',
          'label' => __('创建时间'),
          'width' => 110,
          'hidden' => true,
          'editable' => false,
          'filtertype'=>'time',
        ),
        'uptime' =>array (
          'type' => 'time',
          'hidden' => true,
          'label' => __('更新时间'),
          'width' => 110,
          'editable' => false,
        ),
        'disabled' =>array (
          'type' => 'bool',
          'default' => 'false',
          'editable' => false,
        ),
    ),
    'index'=>array (
        'ind_status'=>array('columns'=>array('status')),
        'ind_express_id'=>array('columns'=>array('express_id'),),
        'ind_disabled'=>array('columns'=>array('disabled')),
        'ind_op_time'=>array('columns'=>array('op_time')),
        'ind_op_user'=>array('columns'=>array('op_user')),
    ),
);